<extend name='Layout/ins_page' />
<block name="content">
	{:W('PageHeader',array('name'=>array('消息->',$reply_name),'search'=>'N'))}
	<div class="operate panel panel-default">
		<div class="panel-body">
			<div class="pull-left">
				<a onclick="go_return_url();" class="btn btn-sm btn-primary">返回</a>
			</div>
			<div class="pull-right">
				<a onclick="save();"  class="btn btn-sm btn-primary">发送</a>
			</div>
		</div>
	</div>
	<form class="well form-horizontal" method='post' id="form_data" name="form_data" enctype="multipart/form-data">
		<input type="hidden" id="ajax" name="ajax" value="0">
		<input type="hidden" id="add_file" name="add_file">
		<input type="hidden" id="receiver_id" name="receiver_id" value="{$reply_id}"/>
		<input type="hidden" id="receiver_name" name="receiver_name" value="{$reply_name}"/>
		<input type="text" style="display:none">
		<div class="form-group">
			<div class="col-xs-12">
				发送消息给 {$reply_name}
			</div>
		</div>
		<div class="form-group">
			<div class="col-xs-12">
				<textarea  class="simple" id="content" name="content" class="col-xs-12" check="require" msg="请输入内容"></textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-2 control-label" for="name">附件：</label>
			<div class="col-sm-10">
				{:W('FileUpload/add')}
			</div>
		</div>
	</form>
	<hr>
	<div>
		<div class="dialogs">
			<foreach name="list" item="vo">
				<div class="row">
					<div class="col-xs-1">
						<div class="user">
							<img class="img-thumbnail" src="__ROOT__/{$vo.sender_id|get_emp_pic}" onerror="javascript:this.src='/Uploads/emp_pic/no_avatar.jpg'"/>
						</div>
					</div>
					<div class="col-xs-11">
						<p>
							{$vo.sender_name}：{$vo.content}
						</p>
						<p>
							<span>{$vo.create_time|to_date='Y-m-d'}</span>
						</p>
						<p>
							{:W('FileUpload/link',array($vo['add_file']))}
						</p>
					</div>
				</div>
				<hr>
			</foreach>
		</div>
	</div>	
</block>
<block name="js">
	<script type="text/javascript">
		function save() {
			sendForm("form_data", '{:U("reply")}');
		}
	</script>
</block>
